package com.huluobo.sign

import com.huluobo.lib_base.BaseRepo
import com.huluobo.lib_base.Res
import com.huluobo.lib_http.HttpType
import com.huluobo.lib_http.NetworkFactory
import com.huluobo.sign.entity.SignEntity
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

/**
 *  Created by LC on 2025/3/15.
 */
class SignRepo @Inject constructor() : BaseRepo() {
    private val apiService by lazy { NetworkFactory.factory(HttpType.TOKEN).create(ApiService::class.java) }

    fun getSigns(page: String, limit: String): Flow<Res<SignEntity>> {
        return apiService.getSigns(page, limit)
    }

    fun addSign(map: Map<String, Any>): Flow<Res<Any>> {
        return apiService.addSign(mapToJson(map))
    }
}